<template>
  <div ref="containerRef">
    <slot :instance></slot>
  </div>
</template>

<script setup lang="ts">
import { useSortable } from '@/hooks/useSortable'

const modelValue = defineModel()

const containerRef = ref<HTMLElement>()

const { instance, destroy } = useSortable(containerRef, modelValue, useAttrs())

defineExpose({
  destroy
})
</script>

<style scoped lang="scss"></style>
